package com.github.prontera.model;

import java.time.OffsetDateTime;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.github.prontera.util.converter.jackson.OffsetDateTimeToIso8601Serializer;

import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * 标识Domain并且限定CrudService边界
 *
 * @author Alex
 */
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler", "fieldHandler" }, ignoreUnknown = true)
public class BasicDomain extends IdentityDomain {

	private static final long serialVersionUID = 6404939125344686735L;

	
	/**
	 * 手机号
	 */
	@ApiModelProperty(value = "手机号")
	protected String mobile;
	/**
	 * 昵称
	 */
	@ApiModelProperty(value = "昵称")
	protected String nickname;
	/**
	 *客户端唯一ID
	 */
	@ApiModelProperty(value = "客户端唯一ID")
	protected String cid;
	
	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getCid() {
		return cid;
	}

	public void setCid(String cid) {
		this.cid = cid;
	}

	@JsonSerialize(using = OffsetDateTimeToIso8601Serializer.class)
	@Override
	public OffsetDateTime getCreateTime() {
		return super.getCreateTime();
	}

	@JsonSerialize(using = OffsetDateTimeToIso8601Serializer.class)
	@Override
	public OffsetDateTime getUpdateTime() {
		return super.getUpdateTime();
	}

	@JsonSerialize(using = OffsetDateTimeToIso8601Serializer.class)
	@Override
	public OffsetDateTime getDeleteTime() {
		return super.getDeleteTime();
	}
}
